import {server} from "@/api/index"
import {jsonp} from "vue-jsonp"

export function getWeather(data){
    return server({
        url:`https://api.seniverse.com/v3/weather/daily.json?key=SPfUv7ujySio9EVKN&location=${data.city}&language=zh-Hans&unit=c&start=-1&days=5`,
        method:"get",
    })
}

export function getPosition(){
    return jsonp('https://apis.map.qq.com/ws/location/v1/ip?key=O22BZ-YLEWW-3RRRD-YVX6F-R3MAV-2ZBKJ&output=jsonp')
}